import NewContractComp from "containers/contract/my-contract/new-contract";
import ContractDetailComp from "containers/contract/my-contract/contract-detail";
import MyContractComp from "containers/contract/my-contract/my-contract";

import ApproveContract from "containers/approve/contract/contract"
import ApproveContractDetail from "containers/approve/contract/contract-detail"

//合同
const contract = {
  key:'contract',
  icon: 'file',
  subMenu: [
    //我的合同
    {
      key:'my-contract',
      url:'/main/contract/my-contract',
      components: MyContractComp ,
      parent: 'contract',
      children: {
        //新建合同
        newContract: {
          key: 'new-contract',
          url: '/main/contract/my-contract/new-contract/:contractTypeId',
          components: NewContractComp,
          parent: 'my-contract'
        },
        //编辑合同
        editContract: {
          key: 'edit-contract',
          url: '/main/contract/my-contract/edit-contract/:id/:contractTypeId',
          components: NewContractComp,
          parent: 'my-contract'
        },
        //合同详情
        contractDetail: {
          key: 'contract-detail',
          url: '/main/contract/my-contract/contract-detail/:id',
          components: ContractDetailComp,
          parent: 'my-contract'
        }
      }
    },
    //合同复核 不走工作流
    {
      key:'approve-contract',
      url:'/main/contract/approve-contract',
      components: ApproveContract ,
      parent: 'contract',
      children: {
        //复核合同 不走工作流
        contractDetail: {
          key:'approve-contract-detail',
          url:'/main/contract/approve-contract/approve-contract-detail/:id/:status',
          components: ApproveContractDetail ,
          parent: 'approve-contract'
        }
      }
    }
  ]
};

export default contract
